From daee19a8a758c6f4add816b3f127a9cba04de1ce Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 21 Nov 2005 16:10:19 +0100 Subject: [PATCH] Linux swiotlb now uses correct method for determining if any RAM is mapped above 2GB. Signed-off-by: Keir Fraser --- Config.mk | 2 +- linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Config.mk b/Config.mk index 3b24b07abe..645457376a 100644 --- a/Config.mk +++ b/Config.mk @@ -3,7 +3,7 @@ # Currently supported architectures: x86_32, x86_64 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/) XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) -XEN_TARGET_X86_PAE ?= n +XEN_TARGET_X86_PAE ?= y # Tools to run on system hosting the build HOSTCC = gcc diff --git a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c index e2a14d1688..7a50607f05 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c @@ -24,6 +24,7 @@ #include #include #include +#include #define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1))) @@ -186,10 +187,10 @@ swiotlb_init(void) * which we take to mean more than 2GB. */ if (xen_start_info->flags & SIF_INITDOMAIN) { - dom0_op_t op; - op.cmd = DOM0_PHYSINFO; - if ((HYPERVISOR_dom0_op(&op) == 0) && - (op.u.physinfo.total_pages > 0x7ffff)) + unsigned long ram_end; + if (HYPERVISOR_memory_op(XENMEM_maximum_ram_page, &ram_end)) + BUG(); + if (ram_end > 0x7ffff) swiotlb = 1; } -- 2.30.2